package com.atguigu.lease.web.app.mapper;

import com.atguigu.lease.model.entity.ViewAppointment;
import com.atguigu.lease.web.app.vo.appointment.AppointmentDetailVo;
import com.atguigu.lease.web.app.vo.appointment.AppointmentItemVo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @author xiongkunYang
 * @description 针对表【view_appointment(预约看房信息表)】的数据库操作Mapper
 * @createDate 2025-04-19 22:27:34
 * @Entity com.atguigu.lease.model.entity.ViewAppointment
 */
@Mapper
public interface ViewAppointmentMapper extends BaseMapper<ViewAppointment> {

    /**
     * 根据用户id查询预约信息
     *
     * @param userId 用户id
     * @return 预约信息列表
     */
    List<AppointmentItemVo> selectAppointmentItemListByUserId(Long userId);

    /**
     * 根据预约信息id查询预约信息详情
     *
     * @param id 预约信息id
     * @return 封装了预约信息详情的Vo对象
     */
    AppointmentDetailVo selectAppointmentDetailById(Long id);
}




